﻿@model RedSand.Site.Models.NewsInfo
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="dialog" title="Create" style="width: 750px;">
    @using (Ajax.BeginForm(AdminAjaxOptions.CreateNew))
    {
        <div class="dialog-content">
            <div style="float: left; width: 504px">
                <div class="form-cell none-float">
                    @Html.LabelFor(model => model.Title)
                    @Html.EditorFor(model => model.Title)
                </div>
                <div class="form-cell none-float">
                    @Html.LabelFor(model => model.Alias)
                    @Html.EditorFor(model => model.Alias)
                </div>
                <div class="form-cell">
                    @Html.LabelFor(model => model.Status)
                    @Html.DropDownListFor(model => model.Status, DropDownListHelper.GetStatusList(false))
                </div>
                <div class="clear"></div>
                <div class="form-cell none-float">
                    @Html.LabelFor(model => model.Image)
                    <input type="text" id="choose-avatar" class="choose-file" name="NewImage"/>
                </div>
            </div>
            <div style="float: right; width: 180px;  height:179px; overflow:auto; margin: 25px 5px 0 0">
                <img id="upload-image-preview" alt="" src="" style="width:100%" />
            </div>
            <div class="clear"></div>
            <div class="form-cell none-float">
                @Html.LabelFor(model => model.Description)
                @Html.TextAreaFor(model => model.Description, new { style = "height:50px" })
            </div>
            <div class="form-cell none-float">
                @Html.LabelFor(model => model.Content)
                @Html.TextAreaFor(model => model.Content, new { @class = "editor" })
            </div>
        </div>
        <div class="dialog-footer">
            <input type="submit" value="Save"/>
            <input type="button" value="Cancel" onclick="closeDialog('.dialog')" />
        </div>
    }
</div>
